home *** CD-ROM | disk | FTP | other *** search
- on exitFrame
- global gCurrSndList, gRaceTimer, gRacing, gFlashTimer, gNxtTime, gRampTime, gRaceLength
- if (gCurrSndList <> []) and not soundBusy(1) then
- advanceSndList()
- end if
- if the isStarted of gRaceTimer = 1 then
- reportTimer(gRaceTimer)
- set theRaceTime to the myTime of gRaceTimer
- if gRacing = 0 then
- nothing()
- else
- if gRacing = 1 then
- if theRaceTime >= (60 * 1) then
- goToPhaseTwo()
- end if
- else
- if gRacing = 2 then
- if theRaceTime >= (60 * 1) then
- goToPhaseThree()
- end if
- else
- if gRacing = 3 then
- if theRaceTime >= (60 * gRaceLength) then
- goToPhaseFour()
- else
- raceObstacles()
- end if
- else
- if gRacing = 4 then
- raceObstacles()
- reportTimer(gFlashTimer)
- if the myTime of gFlashTimer >= (60 * 1) then
- flashRaceSign()
- end if
- else
- if gRacing = 5 then
- reportTimer(gFlashTimer)
- if the myTime of gFlashTimer >= (60 * 1) then
- flashRaceSign()
- end if
- else
- if gRacing = 8 then
- if theRaceTime >= (60 * gRaceLength) then
- goToPhaseFour()
- else
- reportTimer(gFlashTimer)
- if the myTime of gFlashTimer >= (gRampTime * 3) then
- stopRampHappiness()
- else
- pursueRampHappiness()
- raceObstacles()
- end if
- end if
- else
- if gRacing = 9 then
- if theRaceTime >= (60 * gRaceLength) then
- goToPhaseFour()
- else
- reportTimer(gFlashTimer)
- if the myTime of gFlashTimer >= 30 then
- stopCollisionPunishment()
- else
- raceObstacles()
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- if (gRacing = 8) or (gRacing = 9) or (gRacing = 3) then
- if theRaceTime >= gNxtTime then
- rollDownClock()
- end if
- end if
- go(the frame)
- end
-
- on keyDown
- global gRacing
- if the keyCode = 123 then
- moveCar("2")
- else
- if the keyCode = 124 then
- moveCar("1")
- else
- if the keyCode = 125 then
- doSpeed("1")
- else
- if the keyCode = 126 then
- doSpeed("2")
- end if
- end if
- end if
- end if
- end
-
- on keyUp
- global gRacing, gPopped
- if the keyCode = 123 then
- moveCar("2")
- else
- if the keyCode = 124 then
- moveCar("1")
- else
- if the keyCode = 125 then
- doSpeed("1")
- else
- if the keyCode = 126 then
- doSpeed("2")
- end if
- end if
- end if
- end if
- if (the key = RETURN) and (gPopped = 1) then
- disappearPop()
- prepRAce()
- end if
- end
-